# TempConvert
TempStr = input()
if TempStr[0] in ['F', 'f']:
    c = (eval(TempStr[1::1]) - 32) / 1.8
    print("C{:.2f}".format(c))
if TempStr[0] in ['C', 'c']:
    f = eval(TempStr[1::1]) * 1.8 + 32
    print("F{:.2f}".format(f))
